package com.example.sdemo.api.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/*")
public class IndexController {
    @GetMapping("/index")
    public ModelAndView showPage(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("message","Hello World!");
        modelAndView.setViewName("index");
        return  modelAndView;
    }
}
